-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Types revamp #423
Types revamp #423
Conversation
TypeScript definitions are now bundled into each notifier so that no extra modules need to be installed to get the relevant .d.ts files. In short this means types should "just work".
@@ -30,14 +30,11 @@ | |||
"node", | |||
"types.d.ts" | |||
], | |||
"scripts": { | |||
"postversion": "npm run build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was on the wrong package, it should have been on node.
"build:dist": "../../bin/bundle src/notifier.js --node --exclude=iserror,stack-generator,error-stack-parser,request,pump,byline --standalone=bugsnag | ../../bin/extract-source-map dist/bugsnag.js", | ||
"test": "bundle exec maze-runner" | ||
"test": "bundle exec maze-runner", | ||
"postversion": "npm run build" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The node assets were not built when each version was created. This was the cause.
4486208
to
de7e4cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine, I'm sure you'll sort out what's going on with the tests.
fix(node): Disable breadcrumbs on Node
The changes in this PR mean that TypeScript users only have to install
@bugsnag/js
– nothing extra – to get the JS and the types.This is achieved by a script which copies the
@bugsnag/core
types into each of@bugsnag/browser
and@bugsnag/node
, with an update to the import paths for the.d.ts
files in those modules. This happens at build time.This PR also fixes the type def for the
client.use()
method.